# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=gource
pkgver=0.55
pkgrel=0
pkgdesc="Software version control visualization"
url="https://gource.io/"
arch="all !s390x"
license="GPL-3.0"
makedepends="
	boost-dev
	ftgl-dev
	glew-dev
	glm-dev
	glu-dev
	libjpeg-turbo-dev
	libpng-dev
	pcre2-dev
	sdl2-dev
	sdl2_image-dev
	tinyxml-dev
	"
subpackages="$pkgname-doc"
source="https://github.com/acaudwell/Gource/releases/download/gource-$pkgver/gource-$pkgver.tar.gz
	disable-failing-test.patch
	"

prepare(){
	default_prepare
	update_config_sub
}

build() {
	./configure \
		--host=$CHOST \
		--build=$CBUILD \
		--prefix=/usr \
		--with-tinyxml
	make
}

check() {
	make check || {
		cat ./test-suite.log
		return 1
	}
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
6df687441fc04e9bdfcf3620ed6b8a8fc1ac5774d21f51afdb0d518339ea1518914db77c90fb457ada899653c491a3b45c340665c3efa28bddeac65eeb334488  gource-0.55.tar.gz
65a66b8b4c6facd859cd10f9a7030d2a4803ffb4056cbe48577c976cb6943c5dbd0c2c932808e25323300cc99ed232b5f31c5599ccd4aabcba814dfa42734b88  disable-failing-test.patch
"
